﻿
namespace KingerRobot.MexicoSailunMDC.Spi;
/// <summary>
/// 物料服务
/// </summary>
public interface IMaterialService
{
    /// <summary>
    /// 生产同步规格
    /// </summary>
    /// <param name="materialMDCInfo"></param>
    /// <returns></returns>
    int MesSyncMaterial(MaterialMDCInfo materialMDCInfo);
    /// <summary>
    /// 
    /// 根据任务ID获得喷涂信息
    /// </summary>
    /// <param name="taskNo">任务流水号</param>
    /// <returns></returns>
    SpareMaterialInfo GetSpareMaterialInfo(int taskNo);

    /// <summary>
    /// 定时同步库区堆垛机物料信息
    /// </summary>
    /// <returns></returns>
    List<WcsWarehouseCrnMaterialInfo> WscSyncWarehouseMaterial();

    /// <summary>
    /// 更新同步的库区堆垛机物料信息
    /// <param name="wcsWarehouseCrnMaterialInfos">需要插入的数据</param>
    /// </summary>
    void UpdateWarehouseMaterial(List<WcsWarehouseCrnMaterialInfo> wcsWarehouseCrnMaterialInfos);

    /// <summary>
    /// 通过sku查询
    /// </summary>
    /// <param name="skuId"></param>
    /// <returns></returns>
    int GetHeightTypeBySku(long skuId);

    /// <summary>
    /// 获取库存中所有物料规格和数量
    /// </summary>
    List<StockMaterialCodeNumBean> GetStockMaterialCodeAndNum();

}

/// <summary>
/// 库存物料汇总
/// </summary>
public class WcsWarehouseCrnMaterialInfo
{
    /// <summary>
    /// 库区id
    /// </summary>
    public long? WarehouseId { get; set; }
    /// <summary>
    /// 堆垛机id
    /// </summary>
    public long? CrnId { get; set; }
    /// <summary>
    /// 物料id
    /// </summary>
    public long? MaterialId { get; set; }
    /// <summary>
    /// 物料数量
    /// </summary>
    public int? MaterialCount { get; set; }


}

/// <summary>
/// 物料信息
/// </summary>
public class SpareMaterialInfo
{
    /// <summary>
    /// 物料号
    /// </summary>
    public string Spec { get; set; }
    /// <summary>
    /// 高度
    /// </summary>
    public decimal? Height { get; set; }
    /// <summary>
    /// 内径
    /// </summary>
    public decimal? Inside { get; set; }
    /// <summary>
    /// 外径
    /// </summary>
    public decimal? Outside { get; set; }
}
/// <summary>
/// 物料信息
/// </summary>
public class MaterialMDCInfo
{
    /// <summary>
    /// 物料id
    /// </summary>
    public string MaterialId { get; set; }
    /// <summary>
    /// 代码
    /// </summary>
    public string MaterialCode { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    public string MaterialName { get; set; }
    /// <summary>
    /// 规格
    /// </summary>
    public string MaterialInch { get; set; }
    /// <summary>
    /// 内径
    /// </summary>
    public decimal? InsideDiameter { get; set; }
    /// <summary>
    /// 外径
    /// </summary>
    public decimal? OutsideDiameter { get; set; }
    /// <summary>
    /// 重量
    /// </summary>
    public decimal? TireWeight { get; set; }
    /// <summary>
    /// 冬季最大停放时间 二段胎胚最大停放时间（18~30℃）
    /// </summary>
    public int? Winmax { get; set; }
    /// <summary>
    /// 夏季最大停放时间  二段胎胚最大停放时间（30℃以上）
    /// </summary>
    public int? Summax { get; set; }
    /// <summary>
    /// 冬季最小停放时间 二段胎胚最小停放时间（18~30℃）
    /// </summary>
    public int? Winmin { get; set; }
    /// <summary>
    /// 夏季最小停放时间二段胎胚最小停放时间（30℃以上）
    /// </summary>
    public int? Summin { get; set; }
    /// <summary>
    /// 高度
    /// </summary>
    public decimal? MaterialHeight { get; set; }
}
public class StockMaterialCodeNumBean
{
    public string MaterialCode { get; set; }
    public int Num { get; set; }
    public int LockQuantity { get; set; }

}